<%@page import="controllBen.Eventos"%>
<%@page import="java.util.List"%>
<%@page import="controllServer.EventosControll"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html>
<html lang="pt-br">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Atualize os Eventos</title>

<style type="text/css" media="screen, projection">
	form.lista_eventos{ margin-top: 30px;}
	form.lista_eventos ul li{ margin-top: 10px;}
</style>

</head>
<body>
<%
EventosControll controll = new EventosControll();
List<Eventos> eventos = controll.listaTodos();
%>

<% for(Eventos evento : eventos){%>
	<form method="post" action="AtualizaEventosServlet" class="lista_eventos">
		<ul>
			<li><input type="text" name="titulo" value="<%= evento.getTitulo()%>"></li>
			<li><textarea style="width: 580px; height: 200px;" name="descricao"><%=evento.getDescricao() %></textarea></li>
			<li><input type="hidden" name="id" value="<%= evento.getId()%>"></li>
			<li><input type="hidden" name="action" value="update"></li>
			<li><input type="submit" name="atualiza" value="atualizar"></li>
		</ul>
	</form>
	<form method="post" action="AtualizaEventosServlet" class="lista_eventos">
		<input type="hidden" name="id_delete" value="<%= evento.getId()%>">
		<input type="hidden" name="action" value="delete">
		<input type="submit" name="deleta" value="Deletar">
	</form>
<% }%>
</body>
</html>